<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>约拍平台 - 评价订单</title>
    <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            background-color: #f8f8f8;
            margin: 0;
            padding: 0;
            color: #333;
        }
        .star-rating {
            display: flex;
            flex-direction: row-reverse;
            justify-content: flex-end;
        }
        .star-rating input {
            display: none;
        }
        .star-rating label {
            cursor: pointer;
            width: 40px;
            height: 40px;
            margin-right: 5px;
            position: relative;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .star-rating label i {
            font-size: 28px;
            color: #d1d5db;
        }
        .star-rating label:hover i,
        .star-rating label:hover ~ label i,
        .star-rating input:checked ~ label i {
            color: #fbbf24;
        }
        .tag-item {
            display: inline-block;
            padding: 8px 16px;
            background-color: #f3f4f6;
            border-radius: 20px;
            margin-right: 8px;
            margin-bottom: 8px;
            font-size: 14px;
            cursor: pointer;
        }
        .tag-item.active {
            background-color: #dbeafe;
            color: #3b82f6;
        }
        .submit-btn {
            width: 100%;
            padding: 14px;
            background-color: #3b82f6;
            color: white;
            border-radius: 8px;
            font-weight: 500;
            text-align: center;
            font-size: 16px;
        }
        .submit-btn:disabled {
            background-color: #93c5fd;
        }
        .textarea-counter {
            position: absolute;
            bottom: 10px;
            right: 10px;
            font-size: 12px;
            color: #9ca3af;
        }
    </style>
</head>
<body>
    <!-- 状态栏将通过JS加载 -->
    
    <div class="pt-7 pb-20">
        <!-- 顶部标题栏 -->
        <div class="bg-white px-4 py-3 flex items-center justify-between sticky top-0 z-10 shadow-sm">
            <a href="orders.html" class="text-gray-800">
                <i class="fas fa-arrow-left"></i>
            </a>
            <h1 class="text-lg font-bold">评价订单</h1>
            <div class="w-5"></div>
        </div>
        
        <!-- 订单信息 -->
        <div class="bg-white p-4 mb-4">
            <div class="flex items-center">
                <img src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-1.2.1&auto=format&fit=crop&w=634&q=80" class="w-12 h-12 rounded-full object-cover mr-3">
                <div>
                    <div class="font-medium">Sarah摄影师</div>
                    <div class="text-xs text-gray-500">日系写真基础套餐 | 2023-06-15</div>
                </div>
            </div>
        </div>
        
        <!-- 评分 -->
        <div class="bg-white p-4 mb-4">
            <h2 class="text-base font-medium mb-4">总体评分</h2>
            
            <div class="flex flex-col items-center">
                <div class="star-rating mb-2">
                    <input type="radio" id="star5" name="rating" value="5">
                    <label for="star5"><i class="fas fa-star"></i></label>
                    <input type="radio" id="star4" name="rating" value="4">
                    <label for="star4"><i class="fas fa-star"></i></label>
                    <input type="radio" id="star3" name="rating" value="3">
                    <label for="star3"><i class="fas fa-star"></i></label>
                    <input type="radio" id="star2" name="rating" value="2">
                    <label for="star2"><i class="fas fa-star"></i></label>
                    <input type="radio" id="star1" name="rating" value="1">
                    <label for="star1"><i class="fas fa-star"></i></label>
                </div>
                <div class="text-yellow-500 font-medium" id="ratingText">请点击星星评分</div>
            </div>
        </div>
        
        <!-- 分项评分 -->
        <div class="bg-white p-4 mb-4">
            <h2 class="text-base font-medium mb-4">分项评分</h2>
            
            <div class="mb-4">
                <div class="flex justify-between items-center mb-2">
                    <div class="text-sm">专业水平</div>
                    <div class="flex">
                        <i class="fas fa-star text-yellow-500 text-sm mx-0.5"></i>
                        <i class="fas fa-star text-yellow-500 text-sm mx-0.5"></i>
                        <i class="fas fa-star text-yellow-500 text-sm mx-0.5"></i>
                        <i class="fas fa-star text-yellow-500 text-sm mx-0.5"></i>
                        <i class="fas fa-star text-gray-300 text-sm mx-0.5"></i>
                    </div>
                </div>
                <div class="w-full bg-gray-200 rounded-full h-1.5">
                    <div class="bg-yellow-500 h-1.5 rounded-full" style="width: 80%"></div>
                </div>
            </div>
            
            <div class="mb-4">
                <div class="flex justify-between items-center mb-2">
                    <div class="text-sm">服务态度</div>
                    <div class="flex">
                        <i class="fas fa-star text-yellow-500 text-sm mx-0.5"></i>
                        <i class="fas fa-star text-yellow-500 text-sm mx-0.5"></i>
                        <i class="fas fa-star text-yellow-500 text-sm mx-0.5"></i>
                        <i class="fas fa-star text-yellow-500 text-sm mx-0.5"></i>
                        <i class="fas fa-star text-yellow-500 text-sm mx-0.5"></i>
                    </div>
                </div>
                <div class="w-full bg-gray-200 rounded-full h-1.5">
                    <div class="bg-yellow-500 h-1.5 rounded-full" style="width: 100%"></div>
                </div>
            </div>
            
            <div>
                <div class="flex justify-between items-center mb-2">
                    <div class="text-sm">作品质量</div>
                    <div class="flex">
                        <i class="fas fa-star text-yellow-500 text-sm mx-0.5"></i>
                        <i class="fas fa-star text-yellow-500 text-sm mx-0.5"></i>
                        <i class="fas fa-star text-yellow-500 text-sm mx-0.5"></i>
                        <i class="fas fa-star text-yellow-500 text-sm mx-0.5"></i>
                        <i class="fas fa-star text-gray-300 text-sm mx-0.5"></i>
                    </div>
                </div>
                <div class="w-full bg-gray-200 rounded-full h-1.5">
                    <div class="bg-yellow-500 h-1.5 rounded-full" style="width: 80%"></div>
                </div>
            </div>
        </div>
        
        <!-- 评价标签 -->
        <div class="bg-white p-4 mb-4">
            <h2 class="text-base font-medium mb-4">评价标签（可多选）</h2>
            
            <div class="flex flex-wrap">
                <div class="tag-item">服务专业</div>
                <div class="tag-item">态度友好</div>
                <div class="tag-item">拍摄技术好</div>
                <div class="tag-item">修图精细</div>
                <div class="tag-item">场景多样</div>
                <div class="tag-item">指导耐心</div>
                <div class="tag-item">效率高</div>
                <div class="tag-item">性价比高</div>
                <div class="tag-item">沟通顺畅</div>
                <div class="tag-item">按时交付</div>
            </div>
        </div>
        
        <!-- 评价内容 -->
        <div class="bg-white p-4 mb-4">
            <h2 class="text-base font-medium mb-4">评价内容</h2>
            
            <div class="relative">
                <textarea class="w-full border border-gray-200 rounded-lg p-3 h-32 text-sm" placeholder="请分享您的约拍体验，帮助其他用户了解摄影师..." maxlength="200" id="reviewContent"></textarea>
                <div class="textarea-counter"><span id="charCount">0</span>/200</div>
            </div>
        </div>
        
        <!-- 上传照片 -->
        <div class="bg-white p-4 mb-4">
            <h2 class="text-base font-medium mb-4">上传照片（选填）</h2>
            
            <div class="flex flex-wrap gap-3">
                <div class="w-20 h-20 border border-dashed border-gray-300 rounded-lg flex flex-col items-center justify-center cursor-pointer bg-gray-50">
                    <i class="fas fa-plus text-gray-400"></i>
                    <div class="text-xs text-gray-400 mt-1">添加照片</div>
                </div>
                
                <div class="relative w-20 h-20">
                    <img src="https://images.unsplash.com/photo-1513379733131-47fc74b45fc7?ixlib=rb-1.2.1&auto=format&fit=crop&w=634&q=80" class="w-full h-full object-cover rounded-lg">
                    <div class="absolute top-1 right-1 bg-black bg-opacity-50 rounded-full w-5 h-5 flex items-center justify-center cursor-pointer">
                        <i class="fas fa-times text-white text-xs"></i>
                    </div>
                </div>
                
                <div class="relative w-20 h-20">
                    <img src="https://images.unsplash.com/photo-1515372039744-b8f02a3ae446?ixlib=rb-1.2.1&auto=format&fit=crop&w=634&q=80" class="w-full h-full object-cover rounded-lg">
                    <div class="absolute top-1 right-1 bg-black bg-opacity-50 rounded-full w-5 h-5 flex items-center justify-center cursor-pointer">
                        <i class="fas fa-times text-white text-xs"></i>
                    </div>
                </div>
            </div>
            
            <div class="text-xs text-gray-500 mt-2">
                最多可上传9张照片，每张不超过5MB
            </div>
        </div>
        
        <!-- 匿名评价 -->
        <div class="bg-white p-4 mb-4 flex items-center justify-between">
            <div>
                <div class="font-medium">匿名评价</div>
                <div class="text-xs text-gray-500">开启后，您的头像和昵称将不会显示</div>
            </div>
            <label class="relative inline-flex items-center cursor-pointer">
                <input type="checkbox" class="sr-only peer" id="anonymousToggle">
                <div class="w-11 h-6 bg-gray-200 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-500"></div>
            </label>
        </div>
        
        <!-- 提交按钮 -->
        <div class="p-4">
            <button class="submit-btn" disabled id="submitBtn">提交评价</button>
            <div class="text-xs text-gray-500 text-center mt-3">
                评价一旦提交将无法修改，请认真填写
            </div>
        </div>
    </div>
    
    <script>
        // 加载状态栏
        document.addEventListener('DOMContentLoaded', function() {
            // 创建iOS状态栏
            const statusBar = document.createElement('div');
            statusBar.className = 'bg-black text-white h-7 flex items-center justify-between px-4 text-xs fixed top-0 left-0 right-0 z-50';
            statusBar.innerHTML = `
                <div>
                    <span>9:41</span>
                </div>
                <div class="flex space-x-1">
                    <i class="fas fa-signal"></i>
                    <i class="fas fa-wifi"></i>
                    <i class="fas fa-battery-full"></i>
                </div>
            `;
            document.body.prepend(statusBar);
            
            // 标签点击事件
            const tagItems = document.querySelectorAll('.tag-item');
            tagItems.forEach(item => {
                item.addEventListener('click', function() {
                    this.classList.toggle('active');
                    checkFormValidity();
                });
            });
            
            // 评分事件
            const ratingInputs = document.querySelectorAll('.star-rating input');
            const ratingText = document.getElementById('ratingText');
            const ratingTexts = ['很差', '较差', '一般', '不错', '很棒'];
            
            ratingInputs.forEach(input => {
                input.addEventListener('change', function() {
                    const value = parseInt(this.value);
                    ratingText.textContent = ratingTexts[value - 1];
                    checkFormValidity();
                });
            });
            
            // 文本框字数统计
            const reviewContent = document.getElementById('reviewContent');
            const charCount = document.getElementById('charCount');
            
            reviewContent.addEventListener('input', function() {
                const count = this.value.length;
                charCount.textContent = count;
                checkFormValidity();
            });
            
            // 检查表单是否可提交
            function checkFormValidity() {
                const submitBtn = document.getElementById('submitBtn');
                const hasRating = document.querySelector('.star-rating input:checked');
                const hasContent = reviewContent.value.trim().length > 0;
                
                if (hasRating && hasContent) {
                    submitBtn.disabled = false;
                } else {
                    submitBtn.disabled = true;
                }
            }
            
            // 提交按钮点击事件
            const submitBtn = document.getElementById('submitBtn');
            submitBtn.addEventListener('click', function() {
                if (!this.disabled) {
                    alert('评价提交成功！');
                    window.location.href = 'orders.html';
                }
            });
        });
    </script>
</body>
</html> 